import { View, Text } from '@tarojs/components';
import { AtTag, AtDivider } from 'taro-ui';
import "taro-ui/dist/style/components/tag.scss";
import css from "./index.module.less";
import "./index.less";

export default function ThreeList(props) {
    const { title, releaseTime, state } = props.info;
    let tagStyle = 'unStart';
    if (state === '未开始') tagStyle = 'unStart';
    else if (state === '进行中') tagStyle = 'doing';
    else if (state === '已结束') tagStyle = 'end';

    return (
        <View className={css.list}>
            <View className={css.top}>
                <View className={css.title}>{title}</View>
                <AtTag className={tagStyle} type='primary' size='small'>{state}</AtTag>
            </View>
            <View className={css.time}>{releaseTime}</View>
            <AtDivider content='' height='90' lineColor='rgb(248,247,250)' />
        </View >
    );
}